package es.abredatos.energyes

class HomeController {

	def dateService
	
	def index = {
		def energies = Energy.values()
		def regions = Region.list()
		def years = [*2006..dateService.findLastYearWithProductionItems()]
		def months = Month.values()
		render view:"/index", model:[energies:energies,regions:regions,years:years,months:months]
	}
}
